Image coding apparatus

ABSTRACT

In an image coding apparatus ( 1 ), a Hadamard transform unit ( 11 ) performs horizontal Hadamard transform on a picture of uncompressed image data ( 21 ). The sum total of absolute values of AC component values obtained by the Hadamard transform is calculated as a Hadamard value ( 23 ) of the picture. A scene change determination unit ( 12 ) determines whether a scene change occurs or not in the picture on the basis of the Hadamard value ( 23 ). In a case where a scene change occurs in the picture or where a differential absolute value between the amount of generated codes in a coded GOP and the ideal amount of codes in a GOP is larger than a predetermined reference value, a quantization parameter determination unit ( 13 ) determines a quantization parameter ( 24 ) of the picture on the basis of the Hadamard value ( 23 ) and the target amount of codes of the picture. A coding unit ( 14 ) codes the picture by using the determined quantization parameter ( 24 ).

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. Ser. No. 14/001,980 filedAug. 28, 2013, the entire content of which is incorporated herein byreference. U.S. Ser. No. 14/001,980 is a National Stage ofPCT/JP2012/054526 filed Feb. 24, 2012, which claims priority under 35U.S.C. 119 to Japanese Application No. 2011-041798 filed Feb. 28, 2011.

TECHNICAL FIELD

The present invention relates to an image coding apparatus, and moreparticularly to an image coding apparatus for coding inputted image databy using a characteristic value indicating the complexity of the imagedata.

BACKGROUND ART

Image coding apparatuses record image data to be broadcasted via digitalbroadcasting or the like into recording media such as DVDs or the likeby using image coding techniques such as MPEG2, H.264, or the like. Theimage coding apparatuses perform a code amount control process on thebasis of recording conditions such as capacity of recording media,recording time, or the like.

Non-Patent Document 1 shows TM5 (Test Model 5) which is one of codeamount control methods. The TM5 is a technique proposed in the processof standardization of MPEG2 coding scheme.

The TM5 performs the code amount control by using a characteristic valueof image data, which is referred to as activity. The activity is acharacteristic value indicating the complexity of an image. The activityof a macroblock, for example, is calculated by the following procedure.A differential absolute value between a pixel value of each of pixels ina macroblock and an average pixel value of the pixels in the macroblockis calculated, and then a sum total of the differential absolute valuesof all the pixels in the macroblock is calculated as the activity of themacroblock.

Patent Document 1 discloses a technique for detecting a scene change onthe basis of the activity of image data.

PRIOR-ART DOCUMENTS Patent Documents

-   [Patent Document 1] Japanese Patent Application Laid Open Gazette    No. 2009-232148.-   [Non-Patent Document 1] “Test Model 5”, ISO/IEC JTC1/SC29/WG11,    April, 1993.

The activity is a parameter used for determining coding conditions ofimage data, such as code amount control, detection of scene change, orthe like. Using the activity as the complexity of image data, however,sometimes causes a failure in selection of an appropriate codingcondition. In a case where an appropriate coding condition is notselected, there is a possibility that a bit rate of coded image data maybe largely different from a target bit rate which is set in advance orthe image quality of the coded image data may be degraded.

DISCLOSURE OF INVENTION

The present invention is intended for an image coding apparatus forcoding uncompressed image data on a picture-by-picture basis. Accordingto the present invention, the image coding apparatus comprises aHadamard transform unit configured to calculate a characteristic valueof a first picture by performing Hadamard transform on the first pictureto generate frequency component data and summing absolute values of ACcomponent values included in the frequency component data, and a codingunit configured to code the first picture by using the characteristicvalue as a parameter indicating the complexity of the first picture.

Since the characteristic value includes a frequency component of apicture, by using the characteristic value to code the first picture, itis possible to select an appropriate coding condition of image data.

According to the present invention, the image coding apparatus furthercomprises a code amount calculation unit configured to calculate targetamount of picture codes which is a target value of the amount of codesto be generated by coding the first picture, and a first quantizationparameter determination unit configured to determine a quantizationparameter to be used for coding of the first picture on the basis of thecharacteristic value and the target amount of picture codes, and in theimage coding apparatus of the present invention, the coding unit codesthe first picture by using the quantization parameter.

Since the characteristic value includes a frequency component, bydetermining the quantization parameter of the first picture on the basisof the characteristic value, it is possible to increase the accuracy ofthe code amount control.

According to the present invention, the image coding apparatus furthercomprises a scene change determination unit configured to determine thata scene change occurs in the first picture when a differential absolutevalue between the characteristic value of the first picture and acharacteristic value of a coded leading picture which is closest to thefirst picture among leading pictures of image groups each of which isconstituted of a plurality of pictures is larger than a first thresholdvalue.

Since the characteristic value includes a frequency component of apicture, it is possible to determine whether a scene change occurs ornot in consideration of the variation in the frequency components amongthe pictures.

According to the present invention, the image coding apparatus furthercomprises a first difference calculation unit configured to calculate afirst differential absolute value between a quantization parameter ofthe first picture and a quantization parameter of a first leadingpicture, the first leading picture being a coded leading picture whichis closest to the first picture among leading pictures of image groupseach of which is constituted of a plurality of pictures, a seconddifference calculation unit configured to calculate a seconddifferential absolute value between a quantization parameter of each ofsecond leading pictures and a quantization parameter of a coded leadingpicture positioned immediately before each of the second leadingpictures, the second leading pictures being a predetermined number ofcoded leading pictures starting from the first picture, and a correctionunit configured to correct the quantization parameter of the firstpicture so that a total value of the first differential absolute valueand all second differential absolute values is not larger than apredetermined value.

Since repeated increase and decrease of the quantization parameter isprevented, it is possible to increase the image quality of the codedimage data.

Therefore, it is an object of the present invention to provide atechnique for appropriately selecting a coding condition of image data.

These and other objects, features, aspects and advantages of the presentinvention will become more apparent from the following detaileddescription of the present invention when taken in conjunction with theaccompanying drawings.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a functional block diagram showing a constitution of an imagecoding apparatus in accordance with a first preferred embodiment of thepresent invention;

FIG. 2 is a flowchart of a coding process performed by the image codingapparatus shown in FIG. 1;

FIG. 3 is a view showing a procedure for calculating a Hadamard value,which is performed by a Hadamard transform unit shown FIG. 1;

FIG. 4 is a view showing an arrangement of pictures in H.264 data shownin FIG. 1;

FIG. 5 is a flowchart of a scene change determination process shown inFIG. 2;

FIG. 6 is a flowchart of a quantization parameter determination processshown in FIG. 2;

FIG. 7 is a view showing a correlation between the amount of codes andthe Hadamard value in an intra picture in a case where the quantizationparameter determination unit of FIG. 1 determines a quantizationparameter;

FIG. 8 is a view showing a correlation between the amount of codes andan activity in an intra picture in a case where the quantizationparameter is determined on the basis of the activity of a picture;

FIG. 9 is a flowchart of a quantization parameter determination processin accordance with a second preferred embodiment of the presentinvention;

FIG. 10 is a flowchart of a correction process of a quantizationparameter shown in FIGS. 6 and 9;

FIG. 11 is a view showing a structure of the H.264 data shown in FIG. 1;

FIG. 12 is a view showing a correction direction set in the correctionprocess shown in FIG. 10; and

FIG. 13 is a view showing a change of a quantization parameter of theH.264 data shown in FIG. 1.

BEST MODE FOR CARRYING OUT THE INVENTION

Hereinafter, with reference to figures, the preferred embodiments of thepresent invention will be discussed.

The First Preferred Embodiment 1. Overall Configuration

FIG. 1 is a block diagram showing a functional constitution of an imagecoding apparatus 1 in accordance with the first preferred embodiment ofthe present invention. The image coding apparatus 1 codes uncompressedimage data 21 in accordance with H.264 coding scheme and outputs H.264data 29. The image coding apparatus 1 comprises a Hadamard transformunit 11, a scene change determination unit 12, a quantization parameterdetermination unit 13, a coding unit 14, and a QP correspondence table15.

The Hadamard transform unit 11 performs Hadamard transform on theuncompressed image data 21 which is moving image data, to therebygenerate frequency component data 22 (see FIG. 3). The Hadamardtransform unit 11 adds an AC component value included in the frequencycomponent data 22, to thereby generate a Hadamard value 23. Since theHadamard value 23 is calculated for each of pictures in the uncompressedimage data 21, the Hadamard value 23 corresponds to each picture in theH.264 data 29.

The scene change determination unit 12 determines whether a scene changeoccurs or not in a current picture by using the Hadamard value 23 foreach picture and the amount of generated codes in a GOP (Group ofPicture). The current picture is a picture to be coded.

The quantization parameter determination unit 13 determines aquantization parameter 24 of the current picture on the basis of theHadamard value 23 of the current picture, the target amount of picturecodes, and the QP correspondence table 15. The target amount of picturecodes is a target value of the amount of codes to be generated in codingof the current picture. The QP correspondence table 15 is a table inwhich the quantization parameter 24 corresponding to both the Hadamardvalue 23 and the target amount of picture codes is set.

The quantization parameter determination unit 13 comprises a code amountcalculation unit 131, an error calculation unit 132, and a determinationmethod selection unit 133.

The code amount calculation unit 131 calculates the ideal amount of GOPcodes, the target amount of GOP codes, and the target amount of picturecodes. The ideal amount of GOP codes is an ideal value of the amount ofcodes in the H.264 data 29 on a GOP-by-GOP basis and is calculated onthe basis of a target bit rate which is set prior to the coding. Thetarget amount of GOP codes is a value obtained by adjusting the idealamount of GOP codes on the basis of the amount of generated GOP codes.The amount of generated GOP codes is the amount of codes in the H.264data 29 on a GOP-by-GOP basis.

The error calculation unit 132 calculates a total error and a timeperiod error on the basis of the ideal amount of GOP codes and theamount of generated GOP codes. The total error and the time period errorare used for calculation of the target amount of picture codes. Thetotal error and the time period error will be described later in detail.

The determination method selection unit 133 selects a method ofdetermining the quantization parameter 24 of the current picture out ofthe following two methods. The first method is a method in which thequantization parameter is determined by using the Hadamard value 23 ofthe current picture. The second method is a method in which thequantization parameter 24 of an I (Intra) picture which is codedimmediately before is determined as the quantization parameter 24 of thecurrent picture.

The coding unit 14 inputs therein the uncompressed image data 21. Thecoding unit 14 codes the current picture by using the quantizationparameter 24 of the current picture, to thereby generate the H.264 data29.

2. Overview of Operation

The image coding apparatus 1 performs Hadamard transform on the currentpicture, to thereby generate the frequency component data 22. The sumtotal of the AC component values of the frequency component data 22 isobtained as the Hadamard value 23. The image coding apparatus 1 uses theHadamard value 23 as a characteristic value indicating the complexity ofan image in a picture in order to determine a coding condition of thecurrent picture. The complexity indicates the degree of variation inpixel values of pixels included in the picture. The Hadamard value 23includes a frequency component of the picture. For this reason, in acase where the Hadamard value 23 is used as the characteristic valueindicating the complexity of the image, it is possible to code thepicture in consideration of variation in the frequency component of thepicture. Therefore, it is possible to determine the coding condition ofthe picture with high accuracy.

The image coding apparatus 1 determine whether a scene change occurs ornot in the current picture by using the Hadamard value 23. The imagecoding apparatus 1 can determine whether a scene change occurs or not inconsideration of the variation in the frequency components amongpictures. Therefore, it is possible to increase the detection accuracyof the scene change.

The image coding apparatus 1 determines the quantization parameter 24 onthe basis of the Hadamard value 23 of the current picture. Since thecorrelation between the Hadamard value 23 and the amount of generatedcodes in the picture is higher as compared with the activity, it ispossible to increase the accuracy of the code amount control.

3. Operation Flow of Coding Process

Hereinafter, detailed discussion will be made on an operation of theimage coding apparatus 1. FIG. 2 is a flowchart of a coding processperformed by the image coding apparatus 1.

First, the code amount calculation unit 131 calculates the ideal amountof GOP codes. The ideal amount of GOP codes is calculated on the basisof a frame rate of the H.264 data 29, a target bit rate of the H.264data 29, and the number of pictures per GOP.

In the image coding apparatus 1, the Hadamard transform unit 11 startscalculation of the Hadamard value 23 for each of the pictures in theuncompressed image data 21 (Step S1). The Hadamard transform unit 11calculates the Hadamard value 23 for each picture concurrently with theprocesses in Steps S2 to S6 discussed later.

The image coding apparatus 1 determines a picture to be coded (currentpicture) (Step S2). The scene change determination unit 12 determineswhether a scene change occurs or not in the current picture on the basisof the Hadamard value 23 of the current picture (Step S3).

The quantization parameter determination unit 13 determines thequantization parameter 24 of the current picture on the basis of thedetermination result on the scene change (Step S4). When a scene changeoccurs in the current picture, the quantization parameter determinationunit 13 determines the quantization parameter 24 of the current pictureon the basis of the Hadamard value 23 of the current picture.

The coding unit 14 codes the current picture by using the quantizationparameter determined by the quantization parameter determination unit 13(Step S5). After coding of the current picture, the image codingapparatus 1 determines whether to finish the coding process on theuncompressed image data 21 (Step S6). If the coding process should befinished (“Yes” in Step S6), the image coding apparatus 1 ends theoperation shown in FIG. 2. If the coding process should not be finished(“No” in Step S6), the image coding apparatus 1 repeats the operation ofSteps S2 to S5.

3.1. Calculation of Hadamard Value

Detailed discussion will be made on calculation of the Hadamard value.The Hadamard transform unit 11 calculates the Hadamard value 23 of eachpicture concurrently with the determination of the quantizationparameter (Step S4) and the coding of the picture (Step S5).

FIG. 3 is a schematic view showing an operation flow for calculating theHadamard value 23. A picture 21P is a picture in the uncompressed imagedata 21 and original image data which has not been subjected to apreprocessing such as a prediction process or the like. In FIG. 3, thesize of each of pixels 21 a to 21 h is exaggerated. The Hadamardtransform unit 11 performs Hadamard transform on respective pixel valuesof the eight pixels 21 a to 21 h arranged in a horizontal direction, tothereby generate the frequency component data 22 including a DCcomponent H0 and AC components H1 to H7. Thus, the Hadamard transformunit 11 performs Hadamard transform on each pixel in the picture 21P inunits of eight pixels in the horizontal direction. The coding unit 14does not use the frequency component data 22 in order to code thecurrent picture. The coding unit 14 performs Hadamard transform,independently of the Hadamard transform unit 11, in order to code thecurrent picture.

A sum of absolute values of all the AC components obtained by thehorizontal Hadamard transform is obtained as the Hadamard value 23. Inother words, the Hadamard value 23 is a total value of the absolutevalues of all the AC components obtained by performing Hadamardtransform on all the pixels in the picture in units of eight pixels, andis calculated on a picture-by-picture basis. The Hadamard transform unit11 outputs the Hadamard value 23 to the scene change determination unit12 and the quantization parameter determination unit 13. Since theHadamard value 23 can be obtained without performing any Hadamardtransform in a vertical direction, it is possible to reduce the amountof computation in the calculation of the Hadamard value 23.

3.2. Scene Change Determination Process (Step S3)

Hereinafter, detailed discussion will be made on a scene changedetermination process (Step S3, see FIG. 2).

FIG. 4 is a view showing an arrangement of pictures in the H.264 data29. In FIG. 4, “I” represents an I picture, “B” represents a B(Bi-Directional Predictive) picture, and “P” represents a P (Predictive)picture. Hereinafter, the I picture, the P picture, and the B picturewill be sometimes generally referred to simply as a “picture”. In FIG.4, GOPs 30, 40, and 50 each have one I picture. The I picture ispositioned at the beginning of each GOP.

FIG. 5 is a flowchart of a scene change determination process (Step S3).The scene change determination unit 12 determines whether a scene changeoccurs or not from two criteria, i.e., the change of the Hadamard value23 and the amount of generated GOP codes.

An operation flow of the scene change determination process will bediscussed, taking a case, as an example, where the GOP 40 includingpictures 41 to 49 is a GOP to be coded (current GOP).

The scene change determination unit 12 determines a picture (picture forcomparison) to be compared with the current picture (Step S31). In acase where the P pictures 44 and 47 or the B pictures 42, 43, 45, 46,48, and 49 are current pictures, the picture for comparison is a leadingpicture (I picture 41) of the GOP 40. In a case where the I picture 41is a current picture, the picture for comparison is a leading picture (Ipicture 31) of the GOP 30 which is coded immediately before the GOP 40.In other words, the scene change determination unit 12 determines acoded I picture which is closest to the current picture as the picturefor comparison.

First, the scene change determination unit 12 determines whether a scenechange occurs or not on the basis of the change of the Hadamard value23. The scene change determination unit 12 calculates a Hadamarddifferential value which is a differential absolute value between theHadamard value 23 of the current picture and a Hadamard value 23 of thepicture for comparison (Step S32). The scene change determination unit12 compares the Hadamard differential value with a first SC (SceneChange) threshold value (Step S33). The first SC threshold value iscalculated by multiplying the Hadamard value 23 of the picture forcomparison by a predetermined first SC coefficient. Since the picturefor comparison is a leading picture (I picture) of a GOP, the first SCthreshold value changes on a GOP-by-GOP basis. Further, the first SCthreshold value may be a fixed value which is set prior to the coding ofthe uncompressed image data 21.

When the Hadamard differential value is larger than the first SCthreshold value (“Yes” in Step S33), the scene change determination unit12 determines that a scene change occurs in the current picture (StepS37). In other words, when the Hadamard value 23 of the current picturehas changed by a value over the threshold value obtained from theHadamard value 23 of the picture for comparison, the scene changedetermination unit 12 determines that a scene change occurs.

When the Hadamard differential value is not larger than the first SCthreshold value (“No” in Step S33), the scene change determination unit12 checks if the current picture is the I picture 41 (Step S34). Whenthe current picture is not the I picture 41 (“No” in Step S34), thescene change determination unit 12 ends the operation of FIG. 5.

On the other hand, when the current picture is the I picture 41 (“Yes”in Step S34), the scene change determination unit 12 determines whethera scene change occurs or not by using the amount of generated codes inthe GOP which is coded immediately before. Specifically, the scenechange determination unit 12 calculates a code amount differential value(Step S35). The code amount differential value is a differentialabsolute value between the ideal amount of GOP codes and the amount ofgenerated codes in the GOP 30 which is coded immediately before the GOP40.

When the code amount differential value is larger than a second SCthreshold value (“Yes” in Step S36), the scene change determination unit12 determines that a scene change occurs in the current picture (Ipicture 41) (Step S37). The second SC threshold value is calculated bymultiplying the ideal amount of GOP codes by a predetermined second SCcoefficient indicating the determination criterion for the scene change.In other words, when a ratio of the code amount differential value tothe ideal amount of GOP codes exceeds the threshold value obtained fromthe ideal amount of GOP codes, the scene change determination unit 12determines that a scene change occurs in the current picture (I picture41).

On the other hand, when the code amount differential value is not largerthan the second SC threshold value (“No” in Step S36), the scene changedetermination unit 12 determines that no scene change occurs in thecurrent picture and ends the operation of FIG. 5.

Thus, the scene change determination unit 12 determines whether a scenechange occurs or not in the current picture by using the Hadamarddifferential value. Since the Hadamard value 23 is calculated byperforming Hadamard transform on the picture, a frequency component ofthe picture is taken into consideration. In other words, since the scenechange can be detected on the basis of a change of the frequencycomponent between the current picture and the picture for comparison, itis possible to increase the determination accuracy of the scene change.

When the current picture is an I picture, the scene change determinationunit 12 determines whether a scene change occurs or not on the basis ofthe ideal amount of GOP codes and the amount of generated codes in theGOP 30 which is coded immediately before the current GOP (GOP 40). Thus,since whether a scene change occurs or not is determined by using thetwo parameters, i.e., the Hadamard value 23 and the amount of generatedcodes in the GOP 30 which is coded immediately before the currentpicture, it is possible to increase the determination accuracy of thescene change.

Quantization Parameter Determination Process (Step S4)

Hereinafter, discussion will be made on a quantization parameterdetermination process (Step S4, see FIG. 2). Basically, the quantizationparameter 24 of the coded I picture which is closest to the currentpicture is used as the quantization parameter 24 of the current picture.When a scene change occurs or when the difference between the idealamount of GOP codes and the amount of generated codes in the coded GOPis larger than a selection reference value described later, however, thequantization parameter 24 of the current picture is determined on thebasis of the Hadamard value 23 of the current picture.

FIG. 6 is a flowchart of a quantization parameter determination process(Step S4). The quantization parameter determination unit 13 checks if ascene change occurs in the current picture (Step S401).

When a scene change occurs in the current picture (“Yes” in Step S401),the quantization parameter determination unit 13 determines thequantization parameter 24 by using the Hadamard value 23 of the currentpicture, regardless of the picture type of the current picture.

The code amount calculation unit 131 calculates the target amount ofpicture codes of the current picture on the basis of the ideal amount ofGOP codes (Step S402).

When a scene change occurs, it is not appropriate that the quantizationparameter 24 of the coded I picture which is closest to the currentpicture is used as the quantization parameter 24 of the current picture.In order to reset the quantization parameter 24 of the current picture,the code amount calculation unit 131 calculates the target amount ofpicture codes, assuming the current picture to be an I picture.Adjustment of the quantization parameter 24 in accordance with thepicture type is performed in Step S411 as discussed later. Specifically,the target amount of picture codes is calculated by multiplying theideal amount of GOP codes by the I picture ratio, regardless of thepicture type of the current picture. When the GOP 40 is the current GOP,the I picture ratio is calculated as a ratio of the amount of generatedcodes of the I picture 31 to the amount of generated codes in the GOP 30which is positioned immediately before the GOP 40.

The quantization parameter determination unit 13 determines thequantization parameter 24 by using the Hadamard value 23 of the currentpicture, the target amount of picture codes, and the QP correspondencetable 15 (Step S403). The QP correspondence table 15 is atwo-dimensional table in which the quantization parameter correspondingto both the Hadamard value 23 and the target amount of picture codes isset. The quantization parameter determination unit 13 determines thequantization parameter 24 by referring to the QP correspondence table 15with the Hadamard value 23 of the current picture and the target amountof picture codes as an input parameter.

In Step S403, it is preferable that the quantization parameter 24 shouldbe determined by conversion of the Hadamard value 23 of the currentpicture and the target amount of picture codes into an average value permacroblock. In this case, the Hadamard value 23 and the target amount ofpicture codes per macroblock are set as an input parameter in the QPcorrespondence table 15. This eliminates the necessity of preparing a QPcorrespondence table 15 for each size of the picture.

Thus, when a scene change occurs (“Yes” in Step S401), the quantizationparameter determination unit 13 determines the quantization parameter onthe basis of the Hadamard value 23 and the target amount of picturecodes regardless of the picture type. This is because there is apossibility that when a scene change occurs, the image quality may bedegraded if the quantization parameter 24 of the coded I picture is setas the quantization parameter 24 of the current picture.

Back to the discussion of Step S401, when no scene change occurs in thecurrent picture (“No” in Step S401), the quantization parameterdetermination unit 13 checks if the current picture is an I picture(Step S404). When the current picture is a P picture or a B picture(“No” in Step S404), the quantization parameter 24 of the coded Ipicture which is closest to the current picture is determined as thequantization parameter 24 of the current picture (Step S405). When thecurrent picture is any one of pictures 42 to 49, the quantizationparameter 24 of the I picture 41 is determined as the quantizationparameter 24 of the current picture.

When the current picture is an I picture (“Yes” in Step S404), thequantization parameter determination unit 13 performs the process ofStep S406. The determination method selection unit 133 selects themethod of determining the quantization parameter 24 out of the firstmethod and the second method on the basis of whether the code amountdifferential value exceeds the selection reference value or not (StepS406). The first method is a method in which the quantization parameteris determined on the basis of the Hadamard value 23 of the currentpicture. The second method is a method in which the quantizationparameter is determined by using the quantization parameter 24 of the Ipicture coded immediately before. The code amount differential value iscalculated as a differential absolute value between the ideal amount ofGOP codes and the amount of generated codes in the GOP which is codedimmediately before the current GOP, as discussed in Step S35 (see FIG.5). The selection reference value will be discussed later.

Hereinafter, in the discussion of Steps S406 to S410, as an example,taken is a case where the I picture 41 is the current picture and theGOP 40 is the current GOP, unless otherwise noted.

The reason why the process in Step S406 should be performed will bediscussed. When no scene change occurs in the I picture 41, as a generalrule, the quantization parameter 24 of the leading picture (I picture31) of the GOP 30 which is coded immediately before is set as thequantization parameter 24 of the I picture 41. Herein, considered is acase where a difference between the amount of generated codes in the GOP30 and the ideal amount of GOP codes is not so large as to be determinedthat a scene change occurs in the I picture 41 but relatively large. Inthis case, there is a strong possibility that a difference between theamount of generated codes in the GOP 40 and the ideal amount of GOPcodes may also become relatively large, like in the GOP 30, by settingthe quantization parameter 24 of the leading picture of the GOP 30 asthe quantization parameter 24 of the I picture 41. In order to avoidsuch a case, in Step S406, the quantization parameter determination unit13 selects a method in which the quantization parameter 24 of the Ipicture 41 is determined on the basis of the code amount differentialvalue.

Specifically, in Step S406, the quantization parameter determinationunit 13 calculates the code amount differential value which is adifferential absolute value between the ideal amount of GOP codes andthe amount of generated codes in the GOP 30, like in Step S35 (see FIG.5). The quantization parameter determination unit 13 checks if the codeamount differential value exceeds the selection reference value. Theselection reference value is a reference value used to determine whetherto use the Hadamard value 23 in order to determine the quantizationparameter 24, and is smaller than the second SC threshold value. Theselection reference value is calculated by multiplying the ideal amountof GOP codes by a predetermined selection coefficient.

The selection coefficient is smaller than the second SC coefficient usedfor determining whether a scene change occurs or not. This is becausethe quantization parameter 24 of the I picture 41 is calculated on thebasis of the Hadamard value 23 (Step S403) when a scene change occurs(“Yes” in Step S401), as discussed above.

When the code amount differential value is not larger than the selectionreference value (“No” in Step S406), the determination method selectionunit 133 selects a method in which the quantization parameter 24 of thecoded I picture is used. As the quantization parameter 24 of the Ipicture 41, determined is the quantization parameter 24 of the coded Ipicture 31 which is closest to the I picture 41 (Step S405). This isbecause the difference between the amount of generated codes in the GOP40 and the ideal amount of GOP codes does not increase even when thequantization parameter 24 of the I picture 31 is used for coding of theGOP 40.

On the other hand, when the code amount differential value is largerthan the selection reference value (“Yes” in Step S406), thedetermination method selection unit 133 determines that the differencebetween the amount of generated codes in the GOP 30 and the ideal amountof GOP codes is relatively large. For this reason, selected is a methodin which the quantization parameter 24 is determined on the basis of theHadamard value 23. The code amount calculation unit 131 calculates thetarget amount of codes in the GOP 40 (target amount of GOP codes) (StepS407). In order to make the amount of generated codes on a GOP-by-GOPbasis convergent on the ideal amount of GOP codes, the target amount ofGOP codes is calculated on the basis of the ideal amount of GOP codesand the amount of generated codes in the coded GOP.

Discussion will be made on a procedure for calculating the target amountof GOP codes. First, the error calculation unit 132 calculates the totalerror accompanying the coding of the uncompressed image data 21 by usingEq. 1.ET=Σ(Qg−Qd)  (Eq. 1)

In Eq. 1, “ET” represents the total error, “Qd” represents the idealamount of GOP codes, and “Qg” represents the amount of generated codesin the coded GOP. Specifically, the error calculation unit 132calculates a value (individual error) by subtracting the ideal amount ofGOP codes from the amount of generated codes in the coded GOP and sumsthe individual errors of all the coded GOPs, to thereby obtain the totalerror.

The error calculation unit 132 calculates the time period error by usingEq. 2.

$\begin{matrix}{{Ep} = {\sum\limits_{i = 0}^{range}\;\left( {{Qg} - {Qd}} \right)}} & \left( {{Eq}.\mspace{14mu} 2} \right)\end{matrix}$

In Eq. 2, “Ep” represents the time period error and “range” representsthe number of coded GOPs to be used for calculation of the time perioderror. Specifically, the error calculation unit 132 specifies apredetermined number of coded GOPs with the current GOP as a referenceout of all the coded GOPs and calculates the time period error bysumming the individual errors of the specified coded GOPs.

The error calculation unit 132 calculates the target amount of GOP codesby using Eq. 3.Qa=Qd−(ET·Ce)−(Ep·Ce)  (Eq. 3)

In Eq. 3, “Qa” represents the target amount of GOP codes and “Ce”represents a coefficient not larger than 1, by which the total error andthe time period error are multiplied, which is set prior to the codingof the uncompressed image data 21. Thus, the target amount of GOP codesis calculated on the basis of the ideal amount of GOP codes and thetotal error and the time period error.

Further, a lower limit value is set for the target amount of GOP codes.Though detailed discussion will be made later, the quantizationparameter 24 of the I picture 41 is determined on the basis of theHadamard value 23 and the target amount of picture codes calculated fromthe target amount of GOP codes. When the target amount of GOP codes islargely smaller than the ideal amount of GOP codes, it is thought thatthe quantization parameter 24 is determined to be an extremely highvalue. In this case, the image quality of the GOP 40 including I picture41 is largely degraded. By setting the lower limit value for the targetamount of GOP codes, however, it is possible to maintain the imagequality of the H.264 data 29 at a certain level or higher.

After calculation of the target amount of GOP codes (Step S407), thecode amount calculation unit 131 calculates the target amount of picturecodes (Step S408). The target amount of picture codes is calculated bymultiplying the target amount of GOP codes by the I picture ratio, likein Step S402. The quantization parameter determination unit 13determines the quantization parameter 24 of the I picture 41 on thebasis of the Hadamard value 23 of the I picture 41, the target amount ofpicture codes, and the QP correspondence table 15 (Step S409), like inSt S403.

Thus, even when no scene change occurs in I picture 41, in a case wherethe amount of generated codes in the GOP 30 which is coded immediatelybefore is largely different from the ideal amount of GOP codes, thequantization parameter 24 of the I picture 41 is determined on the basisof the Hadamard value 23. It is thereby possible to make the bit rate ofthe H.264 data 29 convergent on the target bit rate even when the amountof generated codes in the GOP 30 is largely different from the idealamount of GOP codes.

After Step S409, the quantization parameter determination unit 13corrects the quantization parameter 24 of the I picture 41 on the basisof the quantization parameter 24 of the coded I picture (Step S410). Itis thereby possible to prevent the image quality of the H.264 data 29from sharply changing.

Specifically, the quantization parameter determination unit 13 specifiesthe quantization parameters 24 of a predetermined number of (forexample, three) coded I pictures with the GOP 40 as a reference. Thequantization parameter determination unit 13 calculates a sum ofabsolute differences between the quantization parameter 24 of the Ipicture 41 and the quantization parameters 24 of the specified coded Ipictures. When the calculated sum of absolute differences is larger thanan upper limit change value which is set in advance, the quantizationparameter 24 of the I picture 41 is corrected so that the sum ofabsolute differences should not be larger than the upper limit changevalue. Detailed discussion on Step S410 will be made in the secondpreferred embodiment.

Next, discussion will be made on Step S411. The process in Step S411 isperformed after the quantization parameter 24 of the current picture isdetermined in Steps S403 and S405 and after the quantization parameter24 of the current picture is corrected in Step S410. In Step S411, thequantization parameter 24 of the current picture which is determined anyone of Steps S403, S405, and S410 is adjusted in accordance with thepicture type of the current picture. The quantization parameterdetermination unit 13 adds an offset value in accordance with thepicture type of the current picture to the quantization parameter 24(Step S411). When the current picture is a P picture or a B picture, theoffset value is set to be a value larger than 0. When the currentpicture is an I picture, the offset value is set to be 0. The offsetvalue of the I picture, however, may be a value larger than 0.

The quantization parameter determination unit 13 checks if thequantization parameter 24 of the current picture exceeds an upper limitvalue which is set in advance or if the quantization parameter 24 of thecurrent picture does not fall short of the lower limit value (StepS412). When the quantization parameter 24 exceeds the upper limit value,the quantization parameter 24 is set to be the upper limit value. Whenthe quantization parameter 24 falls short of the lower limit value, thequantization parameter 24 is set to be the lower limit value. Thus, thequantization parameter 24 of the current picture is determined. Thecoding unit 14 codes the current picture by using the quantizationparameter 24 determined by the quantization parameter determination unit13 (Step S5, see FIG. 2).

Thus, the image coding apparatus 1 sets the quantization parameter 24 ofthe current picture on the basis of the Hadamard value 23 of the currentpicture. It is thereby possible to increase the accuracy of the codeamount control in coding of the uncompressed image data 21. Hereinafter,the reason for this will be discussed.

FIG. 7 is a view showing a correlation between the amount of codes inthe coded I picture and the Hadamard value of the coded I picture in acase where the quantization parameter of each picture is determined onthe basis of the above-discussed procedure. FIG. 8 is a view showing acorrelation between the amount of codes in the coded I picture and anactivity of the coded I picture in a case where the quantizationparameter of the I picture is determined on the basis of the activity.In FIGS. 7 and 8, the vertical axis represents the amount of codes permacroblock.

As shown in FIGS. 7 and 8, the variation in the amount of generatedcodes in the I picture is smaller in the case where the quantizationparameter is determined by using the Hadamard value than in the casewhere the quantization parameter is determined by using the activity.Therefore, in the case where the quantization parameter of the I pictureis determined by using the Hadamard value, since the variation in theamount of generated codes in the picture can be suppressed, it ispossible to increase the accuracy of the code amount control.

The Second Preferred Embodiment

Hereinafter, with reference to FIG. 9, the second preferred embodimentof the present invention will be discussed. FIG. 9 is a flowchart of aquantization parameter determination process (Step S4) in accordancewith the second preferred embodiment of the present invention. Thesecond preferred embodiment is difference from the first preferredembodiment in that a correction process (Step S410) of the quantizationparameter 24 is performed even after the quantization parameter 24 ofthe current picture is determined in Step S403.

FIG. 10 is a flowchart of a correction process of a quantizationparameter (Step S410). FIG. 11 is a view showing an arrangement of GOPsconstituting the H.264 data 29. Hereinafter, with reference to FIGS. 10and 11, Step S410 will be discussed in detail, taking a case, as anexample, where a leading picture (I picture 61) of a GOP 60 is a currentpicture.

When a scene change occurs and the quantization parameter 24 of the Ipicture 61 is determined (“Yes” in Step S451), the quantizationparameter determination unit 13 sets a correction direction by using theHadamard value 23 of the I picture 61 (Step S452). The correctiondirection is a parameter indicating whether the quantization parameter24 of the I picture 61 which is determined in Step S403 or S409 shouldbe increased or decreased with the quantization parameter 24 of a codedI picture 51 as a reference. FIG. 12 is a view showing a correctiondirection of the quantization parameter 24 of the I picture 61. In FIG.12, the horizontal axis represents a number of each picture and thereference sign of the picture is used conveniently as a value of thehorizontal axis.

In Step S452, the quantization parameter determination unit 13 specifiesthe coded I picture 51 which is closest to the I picture 61.Specifically, the quantization parameter determination unit 13 specifiesthe GOP 50 which is coded immediately before the GOP 60 including the Ipicture 61 and further specifies the I picture 51 as the leading pictureof the GOP 50.

When the Hadamard value 23 of the I picture 61 is larger than theHadamard value 23 of the I picture 51, the quantization parameterdetermination unit 13 determines that the complexity increases from theI picture 51 to the I picture 61 and then determines an upward direction(the direction indicated by an arrow 65) as the correction direction.The quantization parameter 24 of the I picture 61 is so corrected as tobe not smaller than the quantization parameter 24 of the I picture 51.Further, the quantization parameter 24 of the I picture 61 is notcorrected in Step S452 but corrected in Step S456 discussed later.

On the other hand, when the Hadamard value 23 of the I picture 61 issmaller than the Hadamard value 23 of the I picture 51, the quantizationparameter determination unit 13 determines that the complexity decreasesand then determines a downward direction (the direction indicated by anarrow 66) as the correction direction. The quantization parameter 24 ofthe I picture 61 is so corrected as to be not larger than thequantization parameter 24 of the I picture 51.

Back to the discussion of Step S451, when the code amount differentialvalue is larger than the selection reference value, in the case wherethe quantization parameter 24 of the I picture 61 is determined (“No” inStep S451), the quantization parameter determination unit 13 determinesthe correction direction by using the amount of generated GOP codes(Step S453). In other words, Step S453 is executed when the quantizationparameter of the current picture is determined in the processes of StepsS404 to S409 shown in FIG. 6 or FIG. 9.

In Step S453, the quantization parameter determination unit 13 specifiesthe coded GOP (GOP 50) which is closest to the I picture 61. When theamount of generated codes in the GOP 50 is not larger than the idealamount of GOP codes, the quantization parameter determination unit 13determines the upward direction (the direction indicated by an arrow 65)as the correction direction in order to increase the amount of codes. Onthe other hand, when the amount of generated codes in the GOP 50 islarger than the ideal amount of GOP codes, the quantization parameterdetermination unit 13 determines the downward direction (the directionindicated by an arrow 66) as the correction direction in order to reducethe amount of codes.

Next, the quantization parameter determination unit 13 executes StepsS454 and S455. FIG. 13 is a view showing a change of the quantizationparameter 24. In FIG. 13, the horizontal axis represents a number of apicture and the reference sign of the I picture is conveniently used.Hereinafter, Steps S454 and S455 will be discussed, taking a case, as anexample, where the quantization parameters 24 of I pictures 31, 41, and51 are “25, “24”, and “26”, respectively and the quantization parameter24 of the I picture 61 (current picture) is determined to be “23”.

The quantization parameter determination unit 13 calculates the amountof change in the quantization parameter 24 of the I picture 61 (StepS454). Specifically, the quantization parameter determination unit 13calculates a differential absolute value between the quantizationparameter 24 of the I picture 61 and the quantization parameter 24 ofthe leading picture (I picture 51) of the coded GOP 50 which is closestto the I picture 61.

The quantization parameter determination unit 13 calculates an absolutevalue of the amount of change in the quantization parameter 24 of thecoded I picture (Step S455). Specifically, the quantization parameterdetermination unit 13 specifies two leading pictures 51 and 41 of thecoded GOPs with the I picture 61 as a reference. The quantizationparameter determination unit 13 calculates the differential absolutevalue between the quantization parameter 24 of the I picture 51 and thequantization parameter 24 of the I picture 41. The quantizationparameter determination unit 13 further calculates the differentialabsolute value between the quantization parameter 24 of the I picture 41and the quantization parameter 24 of the I picture 31.

The quantization parameter determination unit 13 sets a correction rangeso that a total value of the differential absolute value calculated inStep S454 and all the differential absolute values calculated in StepS455 may be not larger than a predetermined upper limit value (StepS456). The total value is expressed by the following Eq. 4.S=|QP−PrevQP1|+|PrevQP1−PrevQP2|+|PrevQP2−PrevQP3|  (Eq. 4)

In Eq. 4, “S” represents the total value, “QP” represents thequantization parameter 24 of the I picture 61 (current picture), and“PrevQP1”, “PrevQP2”, and “PrevQP3” represent the quantizationparameters 24 of the I pictures 51, 41, and 31, respectively.

With reference to Eq. 4 and FIG. 13, detailed discussion will be made onsetting of the correction range. It is assumed, herein, that the upperlimit change value is set to be 4 and the correction direction isdetermined to be a downward direction in Steps S451 to S453. Since thequantization parameters 24 of the I pictures 51 and 41 are “26” and“24”, respectively, |PrevQP1−PrevQP2| is 2. Since the quantizationparameters 24 of the I pictures 41 and 31 are “24” and “25”,respectively, |PrevQP2−PrevQP3| is 1. Therefore, in order to make thetotal value S not larger than the upper limit change value of “4”, thequantization parameter determination unit 13 has to make|PrevQP1−PrevQP2| not larger than “1”.

The correction direction is the downward direction and the quantizationparameter of the I picture 51 (PrevQP1) is “26”. Therefore, as shown inFIG. 13, the quantization parameter determination unit 13 sets thecorrection range of the quantization parameter 24 of the I picture 61 tobe in a range from “25” to “26” (Step S456).

Next, the quantization parameter determination unit 13 corrects thequantization parameter 24 of the I picture 61 determined in Step S403 orS409 (see FIG. 9) so as to fall within the set correction range (StepS457). As shown in FIG. 13, when the quantization parameter 24 of the Ipicture 61 is “23”, the quantization parameter determination unit 13corrects the quantization parameter 24 of the I picture 61 to be “25”.When the quantization parameter 24 of the I picture 61 is determined tobe a value larger than “26”, the quantization parameter determinationunit 13 corrects the quantization parameter 24 of the I picture 61 to be“26”.

Thus, the quantization parameter determination unit 13 corrects thequantization parameter of the current picture so that the total value ofthe differential absolute values calculated in Steps S454 and S455 maynot be larger than a predetermined upper limit value. As a result, it ispossible to reduce the amplitude of the oscillation of the quantizationparameter (repeated increase and decrease of the quantizationparameter). Since repeated occurrence of increase in the image qualityand degradation in the image quality can be prevented, it is possible toprevent the image quality of the H.264 data 29 from totally degrading.

When a scene change occurs (“Yes” in Step S451), the quantizationparameter determination unit 13 may omit Step S455. In this case, thequantization parameter determination unit 13 sets the correction rangeso that |QP−PrevQP1| may not be larger than the upper limit changevalue. Since the correction range can be set to be larger as comparedwith a case where the correction range is set by using a cumulativevalue of Step S455, it is possible to determine the quantizationparameter of the picture after the occurrence of a scene change in arelatively free manner. In this case, the upper limit change value maybe different from the upper limit change value used in execution of StepS455.

In the above-discussed preferred embodiments, the Hadamard transformunit 11 may perform vertical Hadamard transform besides horizontalHadamard transform, to thereby calculate the Hadamard value. Since theHadamard value including frequency components in the horizontal andvertical directions can be obtained, it is possible to increase thedetection accuracy of the scene change and the accuracy of the codeamount control. Further, the Hadamard transform unit 11 may perform onlyvertical Hadamard transform.

In the above-discussed preferred embodiments, the case has beendiscussed, where the code amount calculation unit 131 calculates thetarget amount of GOP codes by using the ideal amount of GOP codes, thetotal error, and the time period error. The code amount calculation unit131, however, may calculate the target amount of GOP codes by using onlythe ideal amount of GOP codes and the total error. Alternatively, thecode amount calculation unit 131 may calculate the target amount of GOPcodes by using only the ideal amount of GOP codes and the time perioderror. It is thereby possible to further suppress the amount ofcomputation in the coding of the uncompressed image data 21.

Further, in the above-discussed preferred embodiments, the case has beendiscussed, where the amount of codes is controlled on a GOP-by-GOP basisby determining the quantization parameter of the current picture on thebasis of the Hadamard value 23 and the target amount of picture codeswhen the current picture is an I picture. The image coding apparatus 1,however, may control the amount of codes in units of groups eachconstituted of a plurality of pictures, each of which is different fromthe GOP, instead of controlling the amount of codes on a GOP-by-GOPbasis. For example, the image coding apparatus 1 may control the amountof codes in units of two or more continuous GOPs or in units of groupseach constituted of pictures smaller in number than those of a GOP.

In this case, it is preferable that the leading picture should be an Ipicture in a group of pictures as a unit of code amount control. In StepS31 (see FIG. 5), the scene change determination unit 12 determines aleading picture of a group which is closest to the current picture asthe picture for comparison.

In Step S402 (see FIG. 6 or FIG. 9), the code amount calculation unit131 may calculate the target amount of picture codes by multiplying theideal amount of group codes by the leading picture ratio. The leadingpicture ratio can be obtained by calculating a ratio of the amount ofgenerated codes in the leading picture to the amount of generated codesin the group which is coded immediately before. In Step S404 (see FIG. 6or FIG. 9), the quantization parameter determination unit 13 maydetermine whether the current picture is a leading picture of the unitof code amount control or not.

In Steps S454 and S455 (in FIG. 10), the quantization parameterdetermination unit 13 may calculate the differential absolute value byusing the current picture (I picture 61) and the leading picture of thegroup, instead of the I pictures 51, 41, and 61.

While the invention has been shown and described in detail, theforegoing description is in all aspects illustrative and notrestrictive. It is therefore understood that numerous modifications andvariations can be devised without departing from the scope of theinvention.

The invention claimed is:
 1. An image coding apparatus for codinguncompressed image data on a picture-by-picture basis, comprising: aHadamard transform unit configured to calculate a Hadamard value of afirst picture by performing Hadamard transform on said first picture togenerate frequency component data and summing absolute values of ACcomponent values included in said frequency component data; and a scenechange determination unit configured to determine whether a scene changehas occurred in said first picture based on a difference between theHadamard value of said first picture and a Hadamard value of a picturethat is coded prior to the first picture.
 2. The image coding apparatusaccording to claim 1, wherein said Hadamard transform unit performs theHadamard transform on said first picture in units of a predeterminednumber of pixels arranged in a horizontal direction.
 3. The image codingapparatus according to claim 1, further comprising: a code amountcalculation unit configured to calculate target amount of picture codeswhich is a target value of the amount of codes to be generated by codingthe first picture; a first quantization parameter determination unitconfigured to determine a quantization parameter to be used for codingof said first picture on the basis of said Hadamard value and saidtarget amount of picture codes; and a coding unit configured to codesaid first picture by using said quantization parameter.
 4. The imagecoding apparatus according to claim 3, wherein said code amountcalculation unit calculates the ideal amount of group codes which is anideal value of the amount of codes in an image group constituted of aplurality of pictures on the basis of a target bit rate which is set inadvance, said image coding apparatus further comprising: a secondquantization parameter determination unit configured to determine aquantization parameter of a coded leading picture which is positioned atthe beginning of an image group and closest to said first picture, to beused as a quantization parameter of said first picture; and adetermination method selection unit configured to select either one ofsaid first quantization parameter determination unit and said secondquantization parameter determination unit on the basis of said idealamount of group codes and the amount of generated codes in an imagegroup which is coded immediately before an image group including saidfirst picture.
 5. The image coding apparatus according to claim 4,wherein said determination method selection unit selects said firstquantization parameter determination unit when the scene changedetermination unit determines that a scene change occurs in said firstpicture.
 6. The image coding apparatus according to claim 4, whereinsaid determination method selection unit selects either one of saidfirst quantization parameter determination unit and said secondquantization parameter determination unit when said first picture is aleading picture of said image group.
 7. The image coding apparatusaccording to claim 4, further comprising: a total error calculation unitconfigured to obtain an individual error by subtracting said idealamount of group codes from the amount of generated codes in a codedimage group and configured to obtain a total error by summing individualerrors in all coded image groups, wherein said code amount calculationunit calculates said target amount of picture codes on the basis of saidideal amount of group codes and said total error.
 8. The image codingapparatus according to claim 4, further comprising: a period errorcalculation unit configured to obtain an individual error by subtractingsaid ideal amount of group codes from the amount of generated codes in acoded image group and configured to calculate a time period error bysumming individual errors in a predetermined number of coded imagegroups starting from said image group including said picture, whereinsaid code amount calculation unit calculates said target amount ofpicture codes on the basis of said ideal amount of group codes and saidtime period error.
 9. The image coding apparatus according to claim 3,further comprising: a first difference calculation unit configured tocalculate a first differential absolute value between a quantizationparameter of said first picture and a quantization parameter of a firstleading picture, said first leading picture being a coded leadingpicture which is closest to said first picture among leading pictures ofimage groups each of which is constituted of a plurality of pictures; asecond difference calculation unit configured to calculate a seconddifferential absolute value between a quantization parameter of each ofsecond leading pictures and a quantization parameter of a coded leadingpicture positioned immediately before said each of said second leadingpictures, said second leading pictures being a predetermined number ofcoded leading pictures starting from said first picture; and acorrection unit configured to correct said quantization parameter ofsaid first picture so that a total value of said first differentialabsolute value and all second differential absolute values is not largerthan a predetermined value.
 10. The image coding apparatus according toclaim 9, wherein said correction unit determines whether saidquantization parameter of said first picture should be corrected to avalue smaller than said quantization parameter of said first leadingpicture or to a value larger than said quantization parameter of saidfirst leading picture on the basis of the ideal amount of group codeswhich is an ideal value of the amount of codes in an image group and theamount of generated codes in an image group which is coded immediatelybefore an image group including said first picture.
 11. The image codingapparatus according to claim 9, wherein said correction unit determineswhether said quantization parameter of said first picture should becorrected to a value smaller than said quantization parameter of saidfirst leading picture or to a value larger than said quantizationparameter of said first leading picture on the basis of said Hadamardvalue of said first picture and a Hadamard value of said first leadingpicture when it is determined that a scene change occurs in said firstpicture.
 12. The image coding apparatus according to claim 1, wherein:said scene change determination unit determines that the scene changeoccurs in said first picture when a differential absolute value betweensaid Hadamard value of said first picture and a Hadamard value of acoded leading picture which is closest to said first picture amongleading pictures of image groups each of which is constituted of aplurality of pictures is larger than a first threshold value.
 13. Theimage coding apparatus according to claim 12, further comprising: a codeamount calculation unit configured to set the ideal amount of groupcodes which is an ideal value of the amount of codes in said image groupwhich is constituted of a plurality of pictures on the basis of a targetbit rate which is set in advance, wherein said scene changedetermination unit determines that the scene change occurs in said firstpicture when said first picture is a leading picture in an image groupand a differential absolute value between said ideal amount of groupcodes and the amount of generated codes in an image group which is codedimmediately before said image group including said first picture islarger than a second threshold value.
 14. The image coding apparatusaccording to claim 1, wherein the Hadamard transform unit is configuredto calculate the Hadamard value of the first picture independently of acoding unit configured to code said first picture.
 15. An image codingapparatus for coding uncompressed image data on a picture-by-picturebasis, comprising: circuitry configured to calculate a Hadamard value ofa first picture by performing Hadamard transform on said first pictureto generate frequency component data and summing absolute values of ACcomponent values included in said frequency component data; anddetermine whether a scene change has occurred in said first picturebased on a difference between the Hadamard value of said first pictureand a Hadamard value of a picture that is coded prior to the firstpicture.